<template>
  <view>
     <view class="box" @click="showT">成功</view>
    <view class="box" @click="showT6">隐藏</view>
    <view class="box" @click="showT2">默认成功</view>
    <view class="box" @click="showT3">没有图标</view>
    <view class="box" @click="showT4">失败</view>
    <view class="box" @click="showT5">本地图标</view>
    <view class="box" @click="showT7">loading</view>
  </view>
</template>

<script setup lang="js">
const showT = () => {
  uni.showToast({
    title: '成功',
    icon: 'success',
    duration: 5000,
    mask:true,
  });
}
const showT6 = () => {
  uni.hideToast()
}
const showT2 = () => {
  uni.showToast({
    title: '成功',
  });
}
const showT3 = () => {
  uni.showToast({
    title: '成功',
    icon: 'none',
  });
}
const showT4 = () => {
  uni.showToast({
    title: '成功',
    icon: 'error',
  });
}
const showT5 = () => {
  uni.showToast({
    title: 'aaaaaaaa',
    icon: '../../static/logo.png',
  });
}
const showT7 = () => {
  uni.showToast({
    title: 'aaaaaaaa',
    icon: 'loading',
  });
}

</script>


<style scoped lang="scss">
.box{
  height: 40px;
  width: 100%;
  background-color: red;
  margin-top: 10px;
  text-align: left;
  line-height: 40px;
}
</style>
